package com.pet.shop.service;

import com.pet.shop.dto.PageDto;
import com.pet.shop.entity.IBaseEntity;

import java.util.List;

public interface IBaseService<T extends IBaseEntity> {

    /**
     * 删除
     * @param id
     * @return
     */
    int deleteEntity(Long id);

    /**
     * 批量删除
     * @param idList
     * @return
     */
    int deleteEntityList(List<Long> idList);

    T insertEntity(T record);

    T getEntity(Long id);

    /**
     * 更新
     * @param record
     * @return
     */
    int updateEntity(T record);

    /**
     * 分页查找数据
     * @param pageDto
     * @return
     */
    PageDto<T> queryPage(PageDto<T> pageDto);
}
